//
//  ViewController.m
//  BannerHonor
//
//  Created by weiyuan on 17/11/22.
//  Copyright © 2017年 weiyuan. All rights reserved.
//

#import "ViewController.h"
#import "WYBannerView.h"
#import "WYBannerModel.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [self createBaseView];
}


- (void)createBaseView
{
    WYBannerView *bannerView = [[WYBannerView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.width / 2)];
    NSMutableArray *array = [NSMutableArray new];
    for (int i = 0; i < 4; i++) {
        WYBannerModel *model = [WYBannerModel new];
        [array addObject:model];
    }
    bannerView.dataModels = array;
    [bannerView startAnimate];
    [self.view addSubview:bannerView];
}


@end
